<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">会员卡结账实时统计</a></li>
			<li><a href="{:U('AdminBill/recharge_daily')}" target="_self">会员卡充值实时统计</a></li>
		</ul>
		<form class="well form-search" id="form_search" method="post" action="{:U('AdminBill/operation_daily')}">
			<if condition="$is_manager">
			<select name="s_smid" style="margin:0px;">
				<option value="">请选择上级消费机构</option>
				<foreach name="sale_manager_list" item="sitem">
					<option value="{$sitem['id']}" <if condition="$s_smid == $sitem['id']">selected</if>>{$sitem.sale_manage_name}</option>
				</foreach>
			</select>
			<select name="s_sid" style="margin:0px;">
				<option value="">请选择消费机构</option>
				<foreach name="sale_list" item="sitem">
					<option value="{$sitem['id']}" <if condition="$s_sid == $sitem['id']">selected</if>>{$sitem.sale_name}</option>
				</foreach>
			</select>
			<select name="s_mlid" style="margin:0px;">
				<option value="">请选择上级物流公司</option>
				<foreach name="logistics_manager_list" item="sitem">
					<option value="{$sitem['id']}" <if condition="$s_mlid == $sitem['id']">selected</if>>{$sitem.logistics_name}</option>
				</foreach>
			</select>
			<select name="s_lid" style="margin:0px;">
				<option value="">请选择二级物流公司</option>
				<foreach name="logistics_list" item="sitem">
					<option value="{$sitem['id']}" <if condition="$s_lid == $sitem['id']">selected</if>>{$sitem.logistics_name}</option>
				</foreach>
			</select>
			</if>
			<input type="text" name="s_start_time" id="s_start_time" value="<php> echo date('Y-m-d H:i',$s_start_time);</php>" style="margin-bottom: 0px;" class="js-datetime" placeholder="开始时间" >
			至
			<input type="text" name="s_end_time" id="s_end_time" value="<php> echo date('Y-m-d H:i',$s_end_time);</php>" style="margin-bottom: 0px;" class="js-datetime" placeholder="结束时间">

			<input type="submit" class="btn btn-primary" value="搜索" />
			<input type="hidden" name="s_download" id="s_download" value="0"/>
			<a class="btn btn-primary" style="float: right;margin-right:15px;margin-bottom:10px;" href="javascript:downloadExcel(1);">导出报表</a>
		</form>
		<form class="js-ajax-form" action="" method="post">

			<table class="table table-hover table-bordered table-list">
			<tr class="show_chlid">
			    <th colspan="100" style="text-align: center;">筛选结果汇总</td>
			</tr>
			<tr class="show_chlid">
			    <td>汇总单数：{$summary.count}单</td>
			    <td>汇总账单总价：{$summary.goods_price}元</td>
			    <td>汇总优惠金额：{$summary.dis_price}元</td>
			    <td>汇总支付金额：{$summary.price}元</td>
			    <td>汇总商品数量：{$summary.goods_num}升</td>
			    <td>汇总加油数量：{$summary.oil_num}升</td>
			    <td>汇总加气数量：{$summary.not_oil_num}升</td>
			</tr>
			</table>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
                        <th width="50">日期</th>
                        <th width="50">机构名称</th>
                        <th width="50">上级机构名称</th>
                        <th width="50">所属物流公司</th>
						<th width="50">销售笔数	</th>
						<th width="50">加油数量（升）	</th>
						<th width="50">加气数量（升）	</th>
						<th width="100">卡片数</th>
                        <th width="50">支付金额</th>
                        <th width="50">赠送积分</th>
					</tr>
				</thead>
				<foreach name="list" item="vo">
				<tr>
                    <td><b>{$vo.time}</b></td>
                    <td>{$vo.sale_name}</td>
                    <td>{$vo.sale_manage_name}</td>
                    <td>{$vo.logistics_name}</td>
					<td>{$vo.sale_num}</td>
					<td>{$vo.sale_oil_num}</td>
					<td>{$vo.sale_nooil_num}</td>
					<td><php>echo count($vo['card_num']);</php></td>
					<td>{$vo.price}</td>
					<td>{$vo.point}</td>
				</tr>
				</foreach>

			</table>

			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js?1"></script>
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('AdminBill/index',$formget)}";
			}
		}

	</script>
</body>
</html>